<!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
<stack>
<name>in.0</name>
<id>-1</id>
<cardCount>15</cardCount>
<cardID>3017</cardID>
<listID>5364</listID>
<cantModify><false /></cantModify>
<cantDelete><false /></cantDelete>
<cantAbort><false /></cantAbort>
<cardSize>
<width>512</width>
<height>342</height>
</cardSize>
<script>on startUpgetHomeInfopass startUphide menubarhide message boxset the name of background button id 31 to "Menus On"end startUpon enterkeyif the tool is "browse tool"then choose button toolelse if the tool is "button tool"then choose field toolelse choose browse toolend enterkeyon resumegetHomeInfopass resumeend resumeon getHomeInfoglobal stacks,applications,documents,userNameset lockScreen to trueset lockMessages to truepush this cardgo to card "User Preferences" of stack "Home"put card field "User Name" into userNameset userLevel to card field "User Level"set powerKeys to the hilite of button "Power Keys"set blindTyping to the hilite of button "Blind Typing"put field "paths" of card "stacks" into stacksput field "paths" of card "applications" into applicationsput field "paths" of card "documents" into documentspop cardset lockScreen to falseset lockMessages to falsehide menubarhide message boxset the name of background button id 31 to "Menus On"end getHomeInfoon searchScript pattern,stackName -- search all scripts of a stackset lockMessages to trueif stackName is not empty then go to stack stackNameif the script of this stack contains patternthen edit script of this stackrepeat with i = 1 to the number of bkgndsgo to card 1 of bkgnd iif the script of this bkgnd contains patternthen edit script of bkgndrepeat with j = 1 to the number of bkgnd buttonsif the script of bkgnd button j contains patternthen edit script of bkgnd button jend repeatrepeat with j = 1 to the number of bkgnd fieldsif the script of bkgnd field j contains patternthen edit script of bkgnd field jend repeatend repeatrepeat with i = 1 to the number of cardsgo card iif the script of this card contains patternthen edit script of this cardrepeat with j = 1 to the number of card buttonsif the script of card button j contains patternthen edit script of card button jend repeatrepeat with j = 1 to the number of card fieldsif the script of card field j contains patternthen edit script of card field jend repeatend repeatset lockMessages to falseend searchScripton mouseupif the optionkey is not down thenexit mouseupelseif the shiftkey is down thenedit script of this backgroundelseedit script of targetend ifend ifend mouseupon newcardask "What do you want to name this card?"set cursor to 4put "Please wait while we fix things up for you..."put it into newNameif newName is empty thendomenu delete cardexit newcardend ifset the name of this card to newNameset lockscreen to trueput the short name of this background into rememberThispush this cardgo first cardpop cardset lockscreen to falsehide message windowend newcardon controlbutton refif the commandkey is down thenvisual dissolve to blackvisual dissolvego first card of background refexit controlbuttonend ifset cursor to 4put card field ref into theListDoList "Card","Cancel",theList,oneget the resultif it is not empty thenvisual scroll left to grayvisual scroll rightgo card item 2 of itend ifend controlbutton---- LastPathComponent -- given a file pathname, returns the last-- component i.e. whatever comes after the last colon, if anything.-- From Dewi Williams--function LastPathComponent name-- scan backwards for the last colon.repeat with i = the length of name down to 1if character i of name is ":" then exit repeatend repeatif i is 1 then-- Name was of the form ":thing" or "thing". Check for leading-- colon, and adjust if necessary. Done for generality.if first character of name is ":" thenput 2 into iend ifelseadd 1 to i -- skip the colonend if-- Name was of the form